﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="companylist.aspx.cs" Inherits="admin_companylist" MasterPageFile="~/admin/MasterPage2.master" %>

<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>

<asp:Content ID="Content1" runat="server" 
    contentplaceholderid="ContentPlaceHolder1"  >

  
   <table  bgcolor="White" >
   <tr>
    
   
   
    <td align="center" >
        <asp:Image ID="img_error" runat="server" ImageUrl="~/img/exclamation.png" 
            Visible="False" />
   
        <asp:Image ID="img_ok" runat="server" ImageUrl="~/img/checkdone.png" 
            Visible="False" />
        <asp:Label ID="lb_error" runat="server" CssClass="azul" Font-Size="Large"></asp:Label>
         </td>
    <td class="style1">
        <asp:Label ID="lb_users" runat="server" Text="Label" Visible="False"></asp:Label>
         </td>
   </tr>
   <tr>
    <td >
        <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </asp:ToolkitScriptManager>
        </td>
   
    <td >
        
           </td>
    
    <td align="center" >
        </td>
    <td class="style8">
        </td>
   </tr>
   </table>
        
  

   
    
    <asp:TabContainer  runat="server" ID="tabs" ActiveTabIndex="0" Width="1100px" 
        BackColor="White">
        <asp:TabPanel runat="server" ID="tab_login">
     <HeaderTemplate>
     <asp:Image ID="Image1" runat="server" ImageUrl="~/img/llave.gif" 
            Width="15px" />
         Login
    </HeaderTemplate>
       <ContentTemplate>

         <table bgcolor="White" width="100%">
        <tr>
            <td  width="120">
            <asp:LinkButton ID="ln_add" runat="server" CssClass="button2_ok" 
                                                                        
            ForeColor="White" onclick="LinkButton2_Click"    ><span>Add New Login</span></asp:LinkButton>

            </td>
               
            <td width="720">
                &nbsp;
            </td>
        </tr>

             <tr>
                 <td colspan="2" class="caption">
                     Login List &nbsp;</td>
             </tr>

             <tr>
                 <td colspan="2" style="width: 860px" width="140">
                     <asp:Panel ID="Panel1" runat="server">
                      <asp:Panel ID="PMsg" runat="server" CssClass="popup" Width="600px">
                       <table width="600">
                                               
                                                <tr>
                                                    <td style="text-align: center; color: #FFFFFF;" bgcolor="Black" colspan="4" 
                                                        class="style3">
                                                        Account</td>
                                                </tr>
                                                <tr>
                                                    <td style="text-align: left">
                                                        Company</td>
                                                    <td>
                                                        <asp:DropDownList ID="cbcompany" runat="server" CssClass="left" Width="196px">
                                                        </asp:DropDownList>
                                                    </td>
                                                    <td style="text-align: left">
                                                        Agent Name</td>
                                                    <td style="text-align: center">
                                                        <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True" 
                                                            OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged" Width="200px">
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="text-align: left">
                                                        User</td>
                                                    <td style="text-align: center">
                                                        <asp:TextBox ID="tb_user" runat="server" CssClass="left" Width="200px"></asp:TextBox>
                                                    </td>
                                                    <td style="text-align: left">
                                                        Password</td>
                                                    <td style="text-align: center">
                                                        <asp:TextBox ID="tb_pass" runat="server" CssClass="left" Width="200px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="text-align: left">
                                                        Registered Email</td>
                                                    <td style="text-align: center">
                                                        <asp:TextBox ID="tb_mailogin" runat="server" Width="200px"></asp:TextBox>
                                                    </td>
                                                    <td style="text-align: left">
                                                        Registered Phone</td>
                                                    <td style="text-align: center">
                                                        <asp:TextBox ID="tb_phone" runat="server" CssClass="left" Width="200px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="center" style="text-align: left">
                                                        DRE License</td>
                                                    <td align="center">
                                                        <asp:TextBox ID="tb_license" runat="server" CssClass="left" Width="200px"></asp:TextBox>
                                                    </td>
                                                    <td align="center" style="text-align: left">
                                                        E&amp;O Insurance</td>
                                                    <td align="center">
                                                        <asp:TextBox ID="tb_eo" runat="server" CssClass="left" Width="200px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="center" style="text-align: left">
                                                        Licence Expiration</td>
                                                    <td align="center">
                                                        <asp:TextBox ID="tb_exp" runat="server" CssClass="left" Width="200px"></asp:TextBox>
                                                        
                                                            <asp:CalendarExtender ID="tb_expcalendarext" runat="server" Format="MM/dd/yyyy"
                                                                TargetControlID="tb_exp" Enabled="True" >
                                                            </asp:CalendarExtender>
                                                    </td>
                                                    <td align="center" style="text-align: left">
                                                        E&amp;O Expiration</td>
                                                    <td align="center">
                                                        <asp:TextBox ID="tb_exp2" runat="server" CssClass="left" Width="200px"></asp:TextBox>
                                                         
                <asp:CalendarExtender ID="CalendarExtender1" runat="server" Format="MM/dd/yyyy"
                    TargetControlID="tb_exp2" Enabled="True">
                </asp:CalendarExtender>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="center" style="text-align: left" valign="top">
                                                        Address</td>
                                                    <td align="center">
                                                        <asp:TextBox ID="tb_add" runat="server" CssClass="left" Rows="4" 
                                                            TextMode="MultiLine" Width="200px"></asp:TextBox>
                                                    </td>
                                                    <td align="center" style="text-align: left" valign="top">
                                                        W9</td>
                                                    <td align="center">
                                                        <asp:TextBox ID="tb_w" runat="server" CssClass="left" Rows="4" 
                                                            TextMode="MultiLine" Width="200px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="center">
                                                        &nbsp;</td>
                                                    <td align="center" colspan="3">
                                                        <asp:DropDownList ID="DropDownList2" runat="server" Visible="False" 
                                                            Width="200px">
                                                        </asp:DropDownList>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="center">
                                                        &nbsp;</td>
                                                    <td align="center" colspan="3">
                                                        <asp:LinkButton ID="lnk_msg_ok2" runat="server" CssClass="button2_ok" 
                                                            ForeColor="White" OnClick="lnk_msg_ok_Click"><span>Cancel</span></asp:LinkButton>
                                                        <asp:LinkButton ID="LinkButton4" runat="server" CssClass="button2_ok" 
                                                            ForeColor="White" OnClick="delete"><span>Delete</span></asp:LinkButton>
                                                        <asp:LinkButton ID="lnk_msg_ok1" runat="server" CssClass="button2_ok" 
                                                            ForeColor="White" OnClick="lnk_msg_ok1_Click"><span>Save</span></asp:LinkButton>
                                                        <asp:Label ID="lbid" runat="server" Text="0" Visible="False"></asp:Label>
                                                    </td>
                                                </tr>
                                            </table>
                    </asp:Panel>
                       <asp:ModalPopupExtender ID="PMsg_ModalPopupExtender" runat="server" 
                        DynamicServicePath="" Enabled="True" TargetControlID="ln_add" 
             PopupControlID="PMsg" BackgroundCssClass="FondoAplicacion">
                    </asp:ModalPopupExtender>
                     </asp:Panel>
                 </td>
             </tr>

         <tr>
           
             <td colspan="2" >
            
       </td>
       </tr>
       </table>
       </ContentTemplate>

    
    </asp:TabPanel>

    
  
    <asp:TabPanel runat="server" ID="tab_company" Height="1000">
    <HeaderTemplate>
        <asp:Image ID="Image2" runat="server" ImageUrl="~/img/settings.gif" 
            Width="15px" />
      Settings
    </HeaderTemplate>
        <ContentTemplate>
   
        
           <asp:Label ID="viewag" runat="server" Text="1" Visible="False"></asp:Label>
           <asp:Label ID="viewcomp" runat="server" Text="0" Visible="False"></asp:Label>
           <asp:LinkButton ID="ln_viewagent" runat="server" CssClass="button2_ok" 
               ForeColor="White" onclick="ln_viewagent_Click"><span>View Company</span></asp:LinkButton>
              
     
        <asp:Panel ID="pcompany" runat="server" Visible="False">
         
         <table id="Table1" bgcolor="White" width="100%" runat="server">
        <tr runat="server">
            <td  width="110" runat="server">
                <asp:LinkButton ID="ln_addcompany" runat="server" CssClass="button2_ok" 
                    ForeColor="White"><span>Add Company</span></asp:LinkButton> </td>
            <td width="*" runat="server">
                &nbsp;
            </td>
        </tr>

         <tr runat="server">
           
             <td colspan="2" runat="server" >
                   <asp:GridView ID="gv_company" runat="server" AutoGenerateColumns="False" 
                     BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" BorderWidth="1px" 
                     Caption="&lt;table border='0'  width='1050px' cellpadding='0' cellspacing='0' class='captionGray' bgcolor='#FA7E02'&gt;&lt;tr&gt;&lt;td&gt;Company List&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;" 
                     CellPadding="4" CssClass="letra" ForeColor="Black" GridLines="Horizontal" 
                     OnRowDataBound="gv_multiple_RowDataBound" ShowFooter="True" >
                     <AlternatingRowStyle BorderStyle="None" />
                     <Columns>
                         <asp:TemplateField>
                             <ItemTemplate>
                                 <asp:ImageButton ID="bt_edit" runat="server" 
                                     ImageUrl="~/img/icon_content_small.gif" OnClick="editCompany" Text="Save" Width="20" />
                             </ItemTemplate>
                         </asp:TemplateField>
                         <asp:TemplateField>
                             <HeaderTemplate>
                                 Company Name
                             </HeaderTemplate>
                             <ItemTemplate>
                                    <asp:Label ID="lbid" runat="server" Text='<%# Eval("com_id")%>' 
                                         Width="10px" TextAlign="Left" Visible="false"></asp:Label>
                                     <asp:Label ID="lbcompany" runat="server" Text='<%# Eval("com_nombre")%>' 
                                         Width="150px" TextAlign="Left"></asp:Label>
                                 </ItemTemplate>
                         </asp:TemplateField>
                         <asp:TemplateField>
                             <HeaderTemplate>
                                 URL
                             </HeaderTemplate>
                             <ItemTemplate>
                                 <asp:Label ID="lburl" runat="server" 
                                     Text='<%# Eval("com_url")%>' TextAlign="Left" Width="350px" />
                             </ItemTemplate>
                         </asp:TemplateField>
                         <asp:TemplateField>
                             <HeaderTemplate>
                                 Phone
                             </HeaderTemplate>
                             <ItemTemplate>
                                 <asp:Label ID="lbphone" runat="server" 
                                     Text='<%# Eval("com_phone")%>' TextAlign="Left" Width="180px" />
                             </ItemTemplate>
                         </asp:TemplateField>
                         <asp:TemplateField>
                             <HeaderTemplate>
                                 Contacts
                             </HeaderTemplate>
                             <ItemTemplate>
                                 <asp:Label ID="lbcontacts" runat="server" 
                                     Text='<%# Eval("com_contacts")%>' Width="300px" />
                             </ItemTemplate>
                         </asp:TemplateField>
                     </Columns>
                     <EditRowStyle BorderStyle="None" BorderWidth="0px" Font-Underline="True" />
                     <HeaderStyle Font-Bold="True" ForeColor="Black" />
                     <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
                     <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
                 </asp:GridView>
                   <asp:Panel ID="Pnl_company" runat="server" CssClass="popup" Width="600px">
                       <table>
                                               
                                                <tr>
                                                    <td colspan="4" class="captionGray" width="500">
                                                        Company</td>
                                                </tr>
                                                <tr>
                                                    <td style="text-align: center">
                                                        &nbsp;</td>
                                                    <td style="text-align: center">
                                                        &nbsp;</td>
                                                    <td style="text-align: center">
                                                        &nbsp;</td>
                                                    <td style="text-align: center">
                                                        &nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td style="text-align: center" valign="top">
                                                        Company Name</td>
                                                    <td style="text-align: center" valign="top">
                                                        <asp:TextBox ID="txtcompany" runat="server" CssClass="left" Width="200px"></asp:TextBox>
                                                    </td>
                                                    <td style="text-align: left" valign="top">
                                                        Site Address</td>
                                                    <td style="text-align: center" valign="top">
                                                        <asp:TextBox ID="txturl" runat="server" CssClass="left" Width="200px" 
                                                            MaxLength="490" Rows="3" TextMode="MultiLine"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="text-align: center" valign="top">
                                                        Phone</td>
                                                    <td style="text-align: center" valign="top">
                                                        <asp:TextBox ID="tb_phone2" runat="server" Width="200px"></asp:TextBox>
                                                    </td>
                                                    <td style="text-align: center" valign="top">
                                                        Contacts</td>
                                                    <td style="text-align: center" valign="top">
                                                        <asp:TextBox ID="tb_contacts" runat="server" Rows="5" TextMode="MultiLine" 
                                                            Width="200px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="text-align: center">
                                                        &nbsp;</td>
                                                    <td style="text-align: center">
                                                        <asp:Label ID="lbidc" runat="server" Text="0" Visible="False"></asp:Label>
                                                    </td>
                                                    <td style="text-align: center">
                                                        &nbsp;</td>
                                                    <td style="text-align: center">
                                                        &nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td align="center">
                                                        &nbsp;</td>
                                                    <td align="center" colspan="3">
                                                        <asp:LinkButton ID="LinkButton2" runat="server" CssClass="button2_ok" 
                                                            ForeColor="White" onclick="LinkButton2_Click2"><span>Cancel</span></asp:LinkButton>
                                                        <asp:LinkButton ID="ln_deletecomp" runat="server" CssClass="button2_ok" 
                                                            ForeColor="White" OnClick="ln_deletecomp_Click"><span>Delete</span></asp:LinkButton>
                                                        <asp:LinkButton ID="LinkButton3" runat="server" CssClass="button2_ok" 
                                                            ForeColor="White" OnClick="LinkButton3_Click"><span>Save</span></asp:LinkButton>
                                                    </td>
                                                </tr>
                                            </table>
                    </asp:Panel>
                   <asp:ModalPopupExtender ID="ModalPopupExtender1" runat="server" 
                        DynamicServicePath="" Enabled="True" TargetControlID="ln_addcompany" 
             PopupControlID="Pnl_company" BackgroundCssClass="FondoAplicacion">
                    </asp:ModalPopupExtender>
             </td>
        </tr>
        </table> 
        
            
        </asp:Panel>   
        <asp:Panel ID="pagent" runat="server">
         <table id="Table2" bgcolor="White" width="100%" runat="server">
        <tr runat="server">
            <td  width="110" runat="server">
                <asp:LinkButton ID="ln_addagg" runat="server" CssClass="button2_ok" 
                    ForeColor="White"><span>Add Agent</span></asp:LinkButton> </td>
            <td width="*" runat="server">
                &nbsp;
            </td>
        </tr>

         <tr runat="server">
           
             <td colspan="2" runat="server" >
            <asp:GridView ID="gv_agent" runat="server" AutoGenerateColumns="False" 
                                                        Caption="&lt;table border='0' width='100%' cellpadding='0' cellspacing='0' class='captionGray' bgcolor='#FA7E02'&gt;&lt;tr&gt;&lt;td&gt;Agent List&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;" 
                                                        GridLines="Horizontal" 
        onrowdatabound="gv_multiple_RowDataBound" ShowFooter="True" 
                                                        Width="1050px" 
        BackColor="White" BorderColor="#CCCCCC" BorderStyle="None" 
                                                        BorderWidth="1px" 
        CellPadding="4" ForeColor="Black" 
                                                        CssClass="letra">
        <Columns>
        <asp:TemplateField>
            <ItemTemplate>
                 <asp:ImageButton ID="bt_edit"   OnClick="editAgent"  Text="Save" runat="server" ImageUrl="~/img/icon_content_small.gif" Width='20'/>
            </ItemTemplate>
            </asp:TemplateField>
       
        <asp:TemplateField>
            <ItemTemplate>
                <asp:Label ID="lbidag" runat="server" Text='<%# Eval("id") %>' Visible="false"></asp:Label>
            </ItemTemplate>
        
        </asp:TemplateField>
            <asp:TemplateField>
               <HeaderTemplate>Agent Name </HeaderTemplate>
                <ItemTemplate>
                    
                  
                    <asp:Label ID="lbnameag" runat="server" Text='<%# Eval("name")%>'   TextAlign="Left"   />
                    </ItemTemplate>
            </asp:TemplateField>
            <asp:TemplateField>
                <HeaderTemplate>Email </HeaderTemplate>
                <ItemTemplate>
                    <asp:Label ID="lbemailag" runat="server" Text='<%# Eval("mail")%>'   TextAlign="Left"   />
                </ItemTemplate>
                  </asp:TemplateField>
           
                
                
        </Columns>
        <EditRowStyle BorderStyle="None" BorderWidth="0px" Font-Underline="True" />
        <AlternatingRowStyle BorderStyle="None" />
        <HeaderStyle Font-Bold="True" ForeColor="Black" />
        <PagerStyle BackColor="White" ForeColor="Black" HorizontalAlign="Right" />
        <SelectedRowStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" />
    </asp:GridView>
          <asp:Panel ID="Panel2" runat="server" CssClass="popup" Width="600px">
                       <table>
                                               
                                                <tr>
                                                    <td colspan="4" class="captionGray" width="500">
                                                        Agent</td>
                                                </tr>
                                                <tr>
                                                    <td style="text-align: center">
                                                        &nbsp;</td>
                                                    <td style="text-align: center">
                                                        &nbsp;</td>
                                                    <td style="text-align: center">
                                                        &nbsp;</td>
                                                    <td style="text-align: center">
                                                        &nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td style="text-align: center" valign="top">
                                                        Agent Name</td>
                                                    <td style="text-align: center" valign="top">
                                                        <asp:TextBox ID="tbnameag" runat="server" CssClass="left" Width="200px"></asp:TextBox>
                                                    </td>
                                                    <td style="text-align: left" valign="top">
                                                        Email</td>
                                                    <td style="text-align: center" valign="top">
                                                        <asp:TextBox ID="tbemailag" runat="server" CssClass="left" Width="200px"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="text-align: center">
                                                        &nbsp;</td>
                                                    <td style="text-align: center">
                                                        <asp:Label ID="lbidagent" runat="server" Text="0" Visible="False"></asp:Label>
                                                    </td>
                                                    <td style="text-align: center">
                                                        &nbsp;</td>
                                                    <td style="text-align: center">
                                                        &nbsp;</td>
                                                </tr>
                                                <tr>
                                                    <td align="center">
                                                        &nbsp;</td>
                                                    <td align="center" colspan="3">
                                                        <asp:LinkButton ID="lncancelag" runat="server" CssClass="button2_ok" 
                                                            ForeColor="White" onclick="lncancelag_Click"><span>Cancel</span></asp:LinkButton>
                                                        <asp:LinkButton ID="lndeleteag" runat="server" CssClass="button2_ok" 
                                                            ForeColor="White" onclick="lndeleteag_Click"><span>Delete</span></asp:LinkButton>
                                                        <asp:LinkButton ID="lnsaveagg" runat="server" CssClass="button2_ok" 
                                                            ForeColor="White" OnClick="lnsaveagg_Click"><span>Save</span></asp:LinkButton>
                                                    </td>
                                                </tr>
                                            </table>
                    </asp:Panel>
                   <asp:ModalPopupExtender ID="ModalPopupExtender2" runat="server" 
                        DynamicServicePath="" Enabled="True" TargetControlID="ln_addagg" 
             PopupControlID="Panel2" BackgroundCssClass="FondoAplicacion">
                    </asp:ModalPopupExtender>

            </td>
            </tr>
            </table>
          </asp:Panel>

          <br />
          <br />
          <br />
           <br />
            <br />
     </ContentTemplate>
    
    </asp:TabPanel>
   
    

    </asp:TabContainer>
   
     

</asp:Content>


<asp:Content ID="Content2" runat="server" contentplaceholderid="head">
    <style type="text/css">
        .style1
        {
            width: 168px;
        }
        .style3
        {
            height: 20px;
        }
        .style8
        {
            width: 168px;
            height: 20px;
        }
        </style>
</asp:Content>



